package com.bifrost.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the SHIPMENT_TEMPLATE_REGION database table.
 */
@Entity
@Table(name = "MERCHANT_SHIPMENT_REGION",indexes = {
        @Index(name = "SHIPMENT_DISTRICT" , columnList = "SHIPMENT_DISTRICT,MERCHANT_ID" , unique = true)
})
@NamedQuery(name = "MerchantShipmentRegion.findAll", query = "SELECT s FROM MerchantShipmentRegion s")
public class MerchantShipmentRegion implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "SHIPMEN_REGION_ID", unique = true, nullable = false)
    private Long shipmenRegionId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SHIPMENT_CITY" ,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private CountryArea shipmentCity;


    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SHIPMENT_COUNTRY" ,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private Country shipmentCountry;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SHIPMENT_DISTRICT" ,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private CountryArea shipmentDistrict;


    //bi-directional many-to-one association to CountryArea
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SHIPMENT_STATE" ,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private CountryArea shipmentState;

    //bi-directional many-to-one association to MerchantShipment
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "MERCHANT_SHIPMENT_ID" ,foreignKey = @ForeignKey(name = "none", value = ConstraintMode.NO_CONSTRAINT))
    private MerchantShipment merchantShipment;

    @Column(name = "MERCHANT_ID")
    private Long merchantId;

    public MerchantShipmentRegion() {
    }

    public Long getShipmenRegionId() {
        return this.shipmenRegionId;
    }

    public void setShipmenRegionId(Long shipmenRegionId) {
        this.shipmenRegionId = shipmenRegionId;
    }

    public CountryArea getShipmentCity() {
        return this.shipmentCity;
    }

    public void setShipmentCity(CountryArea shipmentCity) {
        this.shipmentCity = shipmentCity;
    }

    public Country getShipmentCountry() {
        return this.shipmentCountry;
    }

    public void setShipmentCountry(Country shipmentCountry) {
        this.shipmentCountry = shipmentCountry;
    }

    public CountryArea getShipmentDistrict() {
        return this.shipmentDistrict;
    }

    public void setShipmentDistrict(CountryArea shipmentDistrict) {
        this.shipmentDistrict = shipmentDistrict;
    }

    public CountryArea getShipmentState() {
        return this.shipmentState;
    }

    public void setShipmentState(CountryArea shipmentState) {
        this.shipmentState = shipmentState;
    }

    public MerchantShipment getMerchantShipment() {
        return this.merchantShipment;
    }

    public void setMerchantShipment(MerchantShipment merchantShipment) {
        this.merchantShipment = merchantShipment;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }
}